package net.zjitc.object.rectangle;


/**
 * @Author admin
 * @Date 2019/3/13 9:24
 * 标准类：私有属性
 *        构造方法重载、set/get方法、其他方法
 */
public class Rectangle {
    private int a;
    private int b;
    public void setA(int a) {
        this.a = a;
    }
    public int getA() {
        return a;
    }
    public void setB(int b) {
        this.b = b;
    }
    public int getB() {
        return b;
    }
    Rectangle() {

    }
    Rectangle(int a, int b) {
        this.a = a;
        this.b = b;
    }
    void getC() {
        System.out.println("周长是：" + 2 * (a + b));
    }
    int getS() {
        return a * b;
    }
}
